{ "cells": [ { "cell_type": "markdown", "id": "678f0b44", "metadata": {}, "source": [ "# Paths\n", "This tutorial demonstrates how paths through the killweb can be extracted from MIMIK." ] }, { "cell_type": "code", "execution_count": null, "id": "e54b5258", "metadata": {}, "outputs": [], "source": [ "import os\n", "%matplotlib widget\n", "\n", "from mimik.killweb import Killweb" ] }, { "cell_type": "markdown", "id": "47fe6f11", "metadata": {}, "source": [ "Load and display the simple killweb." ] }, { "cell_type": "code", "execution_count": null, "id": "1c2d965f", "metadata": {}, "outputs": [], "source": [ "# config filename\n", "config_filename = \"simple_killweb.json\"\n", "configs_pth = os.path.join('configs', config_filename)\n", "\n", "killweb = Killweb(config_file=configs_pth, silent=True)\n", "killweb.create_component_networkx_visualization();" ] }, { "cell_type": "markdown", "id": "2e7b6717", "metadata": {}, "source": [ "All viables paths through the killweb can be printed or exported to a list." ] }, { "cell_type": "code", "execution_count": null, "id": "1db921ed", "metadata": {}, "outputs": [], "source": [ "killweb.print_all_paths_in_killweb()" ] }, { "cell_type": "code", "execution_count": null, "id": "5a6233e4", "metadata": {}, "outputs": [], "source": [ "paths = killweb.get_all_paths_in_killweb()\n", "print(paths)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.0" } }, "nbformat": 4, "nbformat_minor": 5 }